﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<KLS.PPDS.Web.Models.UserViewModel>" %>
<%@ Import Namespace="KLS.PPDS.Resources" %>
<%@ Import Namespace="KLS.PPDS.Utility" %>
<%@ Import Namespace="KLS.PPDS.Utility.Html" %>
<%using (Html.BeginForm("UserList", "User", FormMethod.Post, new { @class = "searchfrom" }))
  {%>
<table class="filter">
    <tr>
        <td>
            <%:Html.DivActionLink(CommonString.New, "/UserSettings", new { @class = "new-button" })%>
        </td>
        <td>
            <%
                if (CommonSession.IsUserSuperAdmin)
                {
            %>
            <span>
                <%:CommonString.Company %>
            </span>
            <span>
                <%:Html.DropDownListFor(u => u.SrcCompanyId, Model.CompanyList, CommonString.All)%>
            </span>
            <%
                }
        else if (CommonSession.IsUserEditor)
        {%>
            <span>
                <%:Html.HiddenFor(u => u.SrcCompanyId)%>
            </span>
            <%  
                }
            %>
        </td>
    </tr>
</table>
<%} %>
